<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>clickOutside</title>
    <style>
        #test{
            width: 200px;
            height: 200px;
            background-color: #ff0;
        }
    </style>
</head>
<body>
    <div id="test"></div>
</body>
<script src="https://www.unpkg.com/ew-color-picker/dist/ew-color-picker.js"></script>
<script>
    const test = document.getElementById("test");
    ewColorPicker.util.baseClickOutSide(test,false,() => {
        console.log('点击test元素区域之外触发',test);
    })
</script>
</html>